Avoid a warning in tests. Patch by Christian Dywan
authorMatthias Clasen <matthiasc@src.gnome.org>
Sun, 14 Dec 2008 00:32:32 +0000 (00:32 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sun, 14 Dec 2008 00:32:32 +0000 (00:32 +0000)
        * gtk/gktfilechooserdefault.c (set_local_only): Avoid a warning
        in tests. Patch by Christian Dywan

svn path=/trunk/; revision=21892

ChangeLog
gtk/gtkfilechooserdefault.c

index ef9e5106cdcca8ca45f504d292305019abbd460e..81631deaaa61b5744ed57c9a15a32afea93bb9e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-12-13  Matthias Clasen  <mclasen@redhat.com>
+
+       Bug 556233 – local-only causes G_IS_FILE warning
+
+       * gtk/gktfilechooserdefault.c (set_local_only): Avoid a warning
+       in tests. Patch by Christian Dywan
+
 2008-12-13  Matthias Clasen  <mclasen@redhat.com>
 
        Bug 563158 – CellRendererProgress pulsing and progressing rows can 
index f5a3880778c3e6a54f340fc724ad2cdb49180931..9dbb56b8be8561907f3b38f98873795db47d18cb 100644 (file)
@@ -5340,7 +5340,8 @@ set_local_only (GtkFileChooserDefault *impl,
          shortcuts_add_bookmarks (impl);
        }
 
-      if (local_only && !g_file_is_native (impl->current_folder))
+      if (local_only && impl->current_folder &&
+           !g_file_is_native (impl->current_folder))
        {
          /* If we are pointing to a non-local folder, make an effort to change
           * back to a local folder, but it's really up to the app to not cause